/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
//创建一个动物类
class Animal{
    public String name = "父类的名字";
    public int age;


    public void running(String name){
        System.out.println(name + "正在跑");
    }
}
//继承动物类
class Dog extends Animal{
    String name = "子类的名字";

    public void running(String name){
        System.out.println("子类的跑");
    }

        }

public class Main {
    public static void main(String[] args) {
        Dog dog = new Dog();
        System.out.println(dog.name);//
        dog.running("sd");
    }
}